\(\int (A+C \sec ^2(c+d x)) \, dx\) [7]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 12, antiderivative size = 15 \[ \int \left (A+C \sec ^2(c+d x)\right ) \, dx=A x+\frac {C \tan (c+d x)}{d} \]

[Out]

A*x+C*tan(d*x+c)/d

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 15, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {3852, 8} \[ \int \left (A+C \sec ^2(c+d x)\right ) \, dx=A x+\frac {C \tan (c+d x)}{d} \]

[In]

Int[A + C*Sec[c + d*x]^2,x]

[Out]

A*x + (C*Tan[c + d*x])/d

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 3852

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Dist[-d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rubi steps \begin{align*} \text {integral}& = A x+C \int \sec ^2(c+d x) \, dx \\ & = A x-\frac {C \text {Subst}(\int 1 \, dx,x,-\tan (c+d x))}{d} \\ & = A x+\frac {C \tan (c+d x)}{d} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 15, normalized size of antiderivative = 1.00 \[ \int \left (A+C \sec ^2(c+d x)\right ) \, dx=A x+\frac {C \tan (c+d x)}{d} \]

[In]

Integrate[A + C*Sec[c + d*x]^2,x]

[Out]

A*x + (C*Tan[c + d*x])/d

Maple [A] (verified)

Time = 0.04 (sec) , antiderivative size = 16, normalized size of antiderivative = 1.07

method result size
default \(A x +\frac {C \tan \left (d x +c \right )}{d}\) \(16\)
parts \(A x +\frac {C \tan \left (d x +c \right )}{d}\) \(16\)
derivativedivides \(\frac {\left (d x +c \right ) A +C \tan \left (d x +c \right )}{d}\) \(21\)
risch \(A x +\frac {2 i C}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}\) \(25\)
parallelrisch \(-\frac {2 C \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )}+A x\) \(35\)
norman \(\frac {A x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-A x -\frac {2 C \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\) \(51\)

[In]

int(A+C*sec(d*x+c)^2,x,method=_RETURNVERBOSE)

[Out]

A*x+C*tan(d*x+c)/d

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 31 vs. \(2 (15) = 30\).

Time = 0.25 (sec) , antiderivative size = 31, normalized size of antiderivative = 2.07 \[ \int \left (A+C \sec ^2(c+d x)\right ) \, dx=\frac {A d x \cos \left (d x + c\right ) + C \sin \left (d x + c\right )}{d \cos \left (d x + c\right )} \]

[In]

integrate(A+C*sec(d*x+c)^2,x, algorithm="fricas")

[Out]

(A*d*x*cos(d*x + c) + C*sin(d*x + c))/(d*cos(d*x + c))

Sympy [F]

\[ \int \left (A+C \sec ^2(c+d x)\right ) \, dx=\int \left (A + C \sec ^{2}{\left (c + d x \right )}\right )\, dx \]

[In]

integrate(A+C*sec(d*x+c)**2,x)

[Out]

Integral(A + C*sec(c + d*x)**2, x)

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 15, normalized size of antiderivative = 1.00 \[ \int \left (A+C \sec ^2(c+d x)\right ) \, dx=A x + \frac {C \tan \left (d x + c\right )}{d} \]

[In]

integrate(A+C*sec(d*x+c)^2,x, algorithm="maxima")

[Out]

A*x + C*tan(d*x + c)/d

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 15, normalized size of antiderivative = 1.00 \[ \int \left (A+C \sec ^2(c+d x)\right ) \, dx=A x + \frac {C \tan \left (d x + c\right )}{d} \]

[In]

integrate(A+C*sec(d*x+c)^2,x, algorithm="giac")

[Out]

A*x + C*tan(d*x + c)/d

Mupad [B] (verification not implemented)

Time = 16.02 (sec) , antiderivative size = 17, normalized size of antiderivative = 1.13 \[ \int \left (A+C \sec ^2(c+d x)\right ) \, dx=\frac {C\,\mathrm {tan}\left (c+d\,x\right )+A\,d\,x}{d} \]

[In]

int(A + C/cos(c + d*x)^2,x)

[Out]

(C*tan(c + d*x) + A*d*x)/d